package com.example.jasyptdemo.rest;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author susc
 * @title: TestConfigController
 * @projectName jasypt-demo
 * @description: TODO
 * @date 2021/10/89:53
 */
@RestController
public class TestConfigController {

    @Value("${spring.datasource.url}")
    private String dbUrl;
    @Value("${spring.datasource.username}")
    private String dbUserName;
    @Value("${spring.datasource.password}")
    private String dbPassword;

    @GetMapping("/getConfig")
    public String readConfig(){
        System.out.println("dbUrl:" + dbUrl);
        System.out.println("dbUserName:" + dbUserName);
        System.out.println("dbPassword:" + dbPassword);
        return "success";
    }
}
